package com.pactera.madp.cp.controller.sidebar.marketing;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.pactera.madp.common.core.util.R;
import com.pactera.madp.cp.service.MarketingExcelService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * (McMarketingExcel)表控制层
 *
 * @author yushen.qi
 * @since 2021-05-24 18:56:04
 */
@RestController
@RequestMapping("/marketingexcelwechat")
@Api(value = "marketingExcel", tags = "营销素材-表格管理侧边栏")
public class MarketingExcelSidebarController {

    /**
     * 服务对象
     */
    @Resource
    private MarketingExcelService marketingExcelService;

    /**
     * 模糊查询
     *
     * @param title
     * @param classification
     * @return
     */
    @GetMapping("/page")
    @ApiOperation(value = "模糊查询")
    public R<IPage> qryPage(Page page, String title, Integer classification) {
        return R.ok(marketingExcelService.selectAllByPageOrName(page,title,classification));
    }

}
